package com.link2room.rodimus.entity;

import com.link2room.common.entity.BaseEntity;
import org.hibernate.annotations.DynamicInsert;

import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;

/**
 * Created by VegetaKo on 2017/2/28.
 */
@DynamicInsert
@Entity
@Table(name = "comment_brandwisdom_questionnaire")
public class CommentBrandwisdomQuestionnaire  extends BaseEntity {
    private String issueid;
    private String awardRule;

    @Basic
    @Column(name = "issueid", nullable = true, length = 16)
    public String getIssueid() {
        return issueid;
    }

    public void setIssueid(String issueid) {
        this.issueid = issueid;
    }

    @Basic
    @Column(name = "award_rule", nullable = true, length = 16)
    public String getAwardRule() {
        return awardRule;
    }

    public void setAwardRule(String awardRule) {
        this.awardRule = awardRule;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        CommentBrandwisdomQuestionnaire that = (CommentBrandwisdomQuestionnaire) o;

        if (issueid != null ? !issueid.equals(that.issueid) : that.issueid != null) return false;
        if (awardRule != null ? !awardRule.equals(that.awardRule) : that.awardRule != null) return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = issueid != null ? issueid.hashCode() : 0;
        result = 31 * result + (awardRule != null ? awardRule.hashCode() : 0);
        return result;
    }
}
